#include "TaskTool.h"

void TaskTool::taskStop()
{
    qDebug()<<"end";

    delete task;
}

TaskTool::~TaskTool()
{
  qDebug()<<"delete Task tool";
}


TaskTool::TaskTool(myFunc func,void*data, QObject *parent)
{
  qDebug()<<"start";
  task = new MyTaskClass();
//  connect(task,SIGNAL(isDone()),this,SLOT(taskStop()));
  connect(task,SIGNAL(finished()),task,SLOT(deleteLater()));
  task->setMyFunc(func,data);
  task->start();
}

